<template>
  <el-config-provider :locale="locale">
    <router-view></router-view>
  </el-config-provider>
</template>
<script>
import {ElConfigProvider} from 'element-plus'

import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import en from 'element-plus/lib/locale/lang/en'

export default {
  name: "App",
  components: {
    ElConfigProvider
  },
  setup() {
    const getLocale = ()=>{
      if (localStorage.getItem('language') === 'en') {
        return en
      } else {
        return zhCn
      }
    }
    let locale = getLocale()
    return {
      locale,
    }
  },
}
</script>
<style>
html, body, #app {
  height: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  background: #f5f5f5;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  border-radius: 3px;
  background: rgba(0,0,0,0.06);
  -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.08);
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: rgba(0,0,0,0.12);
  -webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}
</style>
